package com.antdesignbackend.backend.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;

@Data
@TableName("t_shoporderitem")
public class ShopOrderItem {
    @TableId(value = "Id", type = IdType.AUTO)
    private Integer id;
    /**
     关联订单id
     */
    @TableField("OrderId")
    private Integer orderId;
    /**
     关联商品id
     */
    @TableField("GoodId")
    private Integer goodId;
    /**
     商品名称
     */
    @TableField("GoodName")
    private String goodName;
    /**
     * 商品价格
     */
    @TableField("Amount")
    private Double amount;
    /**
     商品数量
     */
    @TableField("Number")
    private Integer number;
    /**
     * 商品总价格
     */
    @TableField("TotalAmount")
    private Double totalAmount;
    /**
     创建时间
     */
    @TableField("CreateTime")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    /**
     商品图片路径
     */
    @TableField("ImageUrl")
    private String imageUrl;
}
